env = Environment(CCFLAGS = '-g')
env['PLATFORM'] = 'win32'
#gtest库
gtestFile = [ '3rd/gtest/googletest/src/gtest-all.cc']
gmainFile = [ '3rd/gtest/googletest/src/gtest_main.cc']

#word count and parse word 库
wordCountFile = [ 'src/word_count.c']
parseWordsFile = [ 'src/word_parser.c', 'src/log.c']

#sourceFile
sourceFile = [ 'tests/word_count_test.cpp']


includePath = [ '3rd/gtest/googletest/include', '3rd/gtest/googletest',  './src']
libPath = [ '3rd/gtest/googletest/lib', './bin']
libs = [ 'gtest', 'gtest_main', 'word_count' , 'parse_word']


StaticLibrary('3rd/gtest/googletest/lib/gtest',source=gtestFile,CPPPATH=includePath)
StaticLibrary('3rd/gtest/googletest/lib/gtest_main',source=gmainFile,CPPPATH=includePath)

StaticLibrary('bin/word_count',source=wordCountFile,CPPPATH=includePath)
StaticLibrary('bin/parse_word',source=parseWordsFile,CPPPATH=includePath)


env.Program( 'bin/word_count_test', source=sourceFile,CPPPATH=includePath,LIBS=libs,LIBPATH=libPath)